package com.company.hrmadmin.common.constant;

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;

/**
 * 全局常量值
 *
 * @author Song, Wei
 * Date: 2022/3/21 9:44
 */
public final class GlobalConstant {

    private GlobalConstant() {
    }

    /**
     * 验证码字符串长度
     */
    public static final Integer VERIFY_CODE_LENGTH = 4;

    /**
     * token默认有效期，24小时
     */
    public static final Integer TOKEN_AVAILABLE_TIME = 24 * 3600 * 1000;

    /**
     * 验证码默认有效期，5分钟
     */
    public static final Integer VERIFY_AVAILABLE_TIME = 5 * 60;

    /**
     * TOKEN有效状态
     */
    public static final Integer TOKEN_AVAILABLE = 1;

    /**
     * TOKEN无效状态
     */
    public static final Integer TOKEN_UNAVAILABLE = 0;

    /**
     * 个税起征点
     */
    public static final BigDecimal PERSONAL_TAX_START = new BigDecimal("5000.00");

    /**
     * 默认头像URL
     */
    public static final String AVATAR_URL = "http://images.nowcoder.com/head/11t.png";

    /**
     * 当前页码
     */
    public static final String PAGE = "page";

    /**
     * 每页显示记录数
     */
    public static final String LIMIT = "limit ";

    /**
     * SQL分页分隔符
     */
    public static final String SQL_SPLIT = ",";

    /**
     * 排序字段
     */
    public static final String ORDER_FIELD = "sidx";

    /**
     * 排序方式
     */
    public static final String ORDER = "order";

    /**
     * 升序
     */
    public static final String ASC = "asc";

    /**
     * 最大登录账号数：4
     */
    public static final Integer MAX_LOGIN_ACCOUNT_NUM = 4;

    /**
     * 默认密码
     */
    public static final String DEFAULT_PASSWORD = "123456";

    /**
     * 默认加盐值
     */
    public static final String DEFAULT_SALT = "MTNCzbi3fK1a4251zNZQ";

    /**
     * 默认Token名称
     */
    public static final String TOKEN_NAME = "X-Token";

    /**
     * Cookie中设置的token名称
     */
    public static final String COOKIE_NAME = "Admin-Token";

    /**
     * 时间格式化
     */
    public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";

    /**
     * 头像文件类型
     */
    public static final Set<String> AVATAR_FILE_TYPE = Set.of(".jpg", ".jpeg", ".png");


}
